import {
    createStore,
    combineReducers,
    applyMiddleware
} from "redux"


// 引入打印的中间件
import logger from "redux-logger"
import { composeWithDevTools } from 'redux-devtools-extension';

// 做异步
import thunk from "redux-thunk"

//使用redux-devtools ，控制台显示数据

import {
    homeReducer
} from "./modules/home"
import { cateReducer } from "./modules/cate";

// 引入模块
let reducer = combineReducers({
    home: homeReducer,
    cate:cateReducer
})

// 创建仓库
let store = createStore(reducer, composeWithDevTools(applyMiddleware(thunk, logger)))

// 导出仓库
export default store